package gui;

import javax.swing.*;
import java.awt.*;
import java.util.Random;

public class ZariButton extends JToggleButton {
    private int pike=0;
    private Random random;

    public ZariButton(){
        super();
        setPreferredSize(new Dimension(60,60));
        setText("" + pike);
        random=new Random();
    }

    public void hidhZarin(){
        pike=random.nextInt(6)+1;
        setText(""+pike);
    }

    public int getPike() {
        return pike;
    }

    public void setPike(int pike) {
        this.pike=pike;
        setText(""+pike);
    }
}
